<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
 <meta name="Page-topic" content="DsrchD()" />
 <meta name="Description" content="ST-Open Libraries: DsrchD()" />
 <meta name="Keywords" content="ST-Open Software, Open Source, ST-Open, Software, Library, Libraries, free Software, Assembler, C" />
 <meta name="date" content="2009-05-08T00:00:00+00:00" />
 <meta name="robots" content="index,follow" />
 <meta name="revisit-after" content="14 days" />
 <meta name="generator" content="Bernhard Schornak, handwritten" />
 <style type="text/css"><!--@import "../../st.css";--></style>
 <link rel="SHORTCUT ICON" href="../../../../pics/favicon.ico" />
 <title>DsrchD()</title>
</head>
<body id="top">
<div class="pagehd">
<div id="menu">
<ul>
 <li><a href="../../../index.htm">ST-Software</a></li>
 <li><a href="../tut/index.htm">Tutorials</a></li>
 <li><a href="../index.htm">Documentation</a></li>
 <li><a href="../alp.htm">alphabetical</a></li>
 <li><a href="../fct.htm">by Function</a></li>
</ul>
</div>
<div class="update">[2009-05-08]</div><div class="headpc"><img src="../../pics/ste.png" alt="SourceDoc Logo" width="75" height="75" border="0" /></div>
</div>
<div class="crlf1"></div>
&#160;&#160;&#160;<a href="../index.htm"><img src="../../../../pics/nav_up.png" alt="up" width="20" height="20" border="0" title="up" /></a>
&#160;&#160;&#160;<a href="fh_07.htm"><img src="../../../../pics/nav_bk.png" alt="previous" width="20" height="20" border="0" title="previous" /></a>
&#160;&#160;&#160;<a href="fh_09.htm"><img src="../../../../pics/nav_fw.png" alt="next" width="20" height="20" border="0" title="next" /></a>
<div class="text100"><div class="inner">..\st7\lib\sources\fh\fh.S</div><div class="outer"><big>fh.lib</big></div></div>
<div class="crlf1"></div>
<div class="text100"><div class="inner"><b>DsrchD</b></div><div class="outer">Function</div></div><div class="crlf0"></div>
<div class="text100"><div class="inner">rc = DsrchD(muster, MemHandle, subfield, mask, max);</div><div class="outer">Call</div></div><div class="crlf0"></div>
<div class="text100"><div class="inner">
<div class="inners">VOID *</div>
<div class="inners">muster</div>
<div class="innerl">address search pattern</div>
<div class="crlf0"></div>
<div class="inners">DD</div>
<div class="inners">MemHandle</div>
<div class="innerl">MemHandle of target field</div>
<div class="crlf0"></div>
<div class="inners">DD</div>
<div class="inners">subfield</div>
<div class="innerl">subfield number</div>
<div class="crlf0"></div>
<div class="inners">DD</div>
<div class="inners">mask</div>
<div class="innerl">drive mask: bit 0 = A:\ ... bit 25 = Z:\</div>
<div class="crlf0"></div>
<div class="inners">DD</div>
<div class="inners">max</div>
<div class="innerl">max. amount entries</div>
</div><div class="outer">Input</div></div><div class="crlf0"></div>
<div class="text100"><div class="inner">
<div class="inners">DD</div>
<div class="inners">rc</div>
<div class="innerl">00000000 error or no match found<div class="crlf0"></div>xxxxxxxx found directories</div>
</div><div class="outer">Output</div></div><div class="crlf0"></div>
<div class="text100"><div class="inner">
DsrchD() scans the drives set in the drive mask for directories matching the passed pattern. The pattern <b>must</b> look like "search\me\",
 the drive letter (including backslash) "?:\" and a global search mask "*.*" are appended automatically at the beginning, resp. the end.
<div class="crlf1"></div>
Each drive is represented by one bit of the drive mask, where bit 0 is drive A, and so on. If a bit is set, the corresponding drive is
 scanned for directories matching the search pattern. Found directories are appended to the field until the maximum count is reached.
<div class="crlf1"></div>
<b>CAUTION:</b> The entire field is cleared before directory search starts!
</div><div class="outer">Description</div></div><div class="crlf0"></div>
<div class="text100"><div class="inner">
DD MyFunction(DD mh)
<pre>
{
 DD rc;
 rc = DsrchD("my\\folder\\", mh, 0, 0x0000000C, 256);
 return(rc);
}
</pre>
Drives C:\ und D:\ are scanned for directories named "my\folder\". Up to 256 found directory names (including path) are stored in subfield
 0 of field mh. If rc is zero, either no directories with that name exist or an error occured. If rc is not zero, it represents the count
 of found directories.
</div><div class="outer">Example</div></div>
<div class="crlf2"></div>
&#160;&#160;&#160;<a href="../index.htm"><img src="../../../../pics/nav_up.png" alt="up" width="20" height="20" border="0" title="up" /></a>
&#160;&#160;&#160;<a href="fh_07.htm"><img src="../../../../pics/nav_bk.png" alt="previous" width="20" height="20" border="0" title="previous" /></a>
&#160;&#160;&#160;<a href="fh_09.htm"><img src="../../../../pics/nav_fw.png" alt="next" width="20" height="20" border="0" title="next" /></a>
<div class="crlf1"></div>
&#160;&#160;&#160;<a href="http://validator.w3.org/check?uri=http%3A%2F%2Fst-open.com%2Fst-open%2Fdoc%2Fe%2Fmsc%2Ffh_08.htm">
<img src="../../../../pics/xhtml.png" alt="validHTML" width="100" height="35" border="0" title="validate XHTML" /></a>
<div class="crlf1"></div>
</body>
</html>
